<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">

<!--数据双向绑定-->
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        [v-cloak] {
            display: none;
        }
    </style>
</head>


<body>
<div id="main">

    <h1>{{msg}}</h1>
    <!--新建一个表单,value用来显示数据-->
<!--    <input type = "text" value="msg">-->

    <!--此时修改文本框里的值可以双向影响页面上的msg的值，这就是双向影响-->
    <input type ="text" v-model = "msg">

</div>



<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
    var vm = new Vue({
        el: '#main',
        data: {
            msg: 'Hello Vue'
        },


    })
</script>

</body>
</html>